const bcrypt = require('bcrypt');

module.exports = {
    encrypt(password) {
        const salt = bcrypt.genSaltSync(10);
        const hash = bcrypt.hashSync(password, salt);
        return hash;
    },
    decrypt(password, encryptPassword) {
        return bcrypt.compareSync(password, encryptPassword);
    }
}